<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <meta http-equiv="X-UA-Compatible" content="ie=edge"/>
        <title>Document</title>
        <script src = 'moduleA.js'></script>
        <script src = 'moduleA_plus.js'></script>
        <script>
            /* 
                小A

                小B

            解决的问题：
                1、全局变量污染
                2、私有化

            新问题：
                拓展
             */
            /* var moduleA = (function(){
                var count = 10; //私有变量

                function showA(){ //私有函数
                    count += 20;
                    alert(count);
                }
                function showB(){
                    count *= 10;
                    alert(count);
                }

                //对外暴露
                return {
                    outA: showA,
                    outB: showB
                }
            })();

            moduleA = (function(mod){
                function showC(){
                    alert("hello world");
                }

                mod.outC = showC;
                return mod;
            })(moduleA); */

            moduleA.outA();
            moduleA.outB();
            moduleA.outC();
            // alert(count);
            // alert(showA);
        </script>
    </head>
    <body>
        
    </body>
</html>